<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2022/4/24
  Time: 10:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>测试返回的json</title>
</head>
<body>
    <input type="button" value="评论" id="send">


    <script src="../../plugins/jquery.min.js"></script>
    <script>
        function send() {
            $.post(
                "/dev/testjson",
                {"name":"xiaobai"},
                function (data) {
                    console.log(data);
                    data = $.parseJSON(data);
                    console.log(data.userId);
                    console.log(data.questionId);
                    console.log(data.content)

                }
            );

        }



    </script>
</body>
</html>
